package com.example.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.Date;

@Data
@TableName("article")
public class Article extends Model<Article> {
    /**
      * 主键
      */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
      * 标题
      */
    private String title;

    /**
      * 内容
      */
    private String content;

    /**
      * 作者
      */
    private String author;

    /**
      * 时间
      */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date time;

    /**
      * 点赞数
      */
    private Integer praise;

    /**
      * 收藏数
     * read_count
      */
    private Integer readCount;
    private String img;
    private String description;

}
